package com.mall.admin.controller;

import com.mall.commons.utils.R;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

@RestController
@RequestMapping("/minio")
public class MinioController {

    /**
     * 文件上传
     * @param file
     * @return
     */
    @PostMapping("/upload")
    public R upload(MultipartFile file){

        return R.success(null, "文件上传成功!");
    }

    /**
     * 文件删除
     * @param objectName
     * @return
     */
    @PostMapping("/delete")
    public R delete(String objectName){
        return R.success(null, "文件删除成功!");
    }

}
